package com.baizhi.cmfz.appcontroller;

import com.baizhi.cmfz.entity.Article;
import com.baizhi.cmfz.service.ArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/test")
public class ArticleAppController {
    @Autowired
    private ArticleService articleService;
    @RequestMapping("/testselectArticle")
    public List<Article>selectArticle(){
        List<Article> data = (List<Article>) articleService.selectByPageArticle(1, 6, null).get("data");
        return  data;
    }
}
